#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <string.h>
#include "read.h"
#include "lcd.h"
#include "ts.h"

int main()
{
    int fd = open("/dev/ubuntu_lcd",O_RDWR);
    if(fd==-1)
    {
        printf("opened error!");
        return -1;
    }

    plcd = mmap(NULL, 800*480*4,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
    if(plcd == MAP_FAILED)
    {
        perror("mmap");
        return -1;
    }
    brush_lcd(0xffffff);
    draw_bmp("./res/imagefiles/change.bmp", 640, 0);
    show_txt("1.txt");
}